package com.xuanwei.core.entity.param;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @Author jiangyong
 * @Description TODO
 * @Date 2019/7/11 14:24
 **/
@Data
public class UserAddress {

    private Integer id;

    @NotBlank(message = "请选择省份")
    private String province;

    @NotBlank(message = "请选择城市")
    private String city;

    @NotBlank(message = "请选择区/县")
    private String area;

    @Min(value = 0,message = "请选择省份")
    private Integer provinceId;

    @Min(value = 0,message = "请选择城市")
    private Integer cityId;

    @Min(value = 0,message = "请选择区/县")
    private Integer areaId;

    @NotBlank(message = "请输入收货人姓名")
    private String receiveName;

    @Pattern(regexp="^1[3|4|5|6|7|8|9][0-9]\\d{8}$",message = "电话号码格式错误")
    private String receivePhone;

    @NotBlank(message = "请输入详细地址")
    private String receiveAddress;


    private Integer defaultFlag;

}
